<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>查找字符</title>
</head>
<body>
	
	<script type="text/javascript">
        //search():查找字符串出现的位置
        var str = 'adsdkfddf';

        alert(str.search('d'));   //1

	</script>

</body>
</html>